package com.vader.springcloud.controller;

import com.vader.springcloud.entities.CommonResult;
import com.vader.springcloud.openFeigen.FeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author kaivader
 */
@RestController
@Slf4j
@RequestMapping("/payment")
public class OpenFeignController {
    @Resource
    private FeignService feignService;

    @GetMapping("/query/{id}")
    CommonResult<Object> query(@PathVariable("id") Long id) {
        return feignService.query(id);
    }
}
